package com.ruoyi.system.service.impl;

import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.system.domain.DrawGraphInfo;
import com.ruoyi.system.mapper.DrawGraphInfoMapper;
import com.ruoyi.system.service.IDrawGraphInfoService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 【请填写功能名称】Service业务层处理
 *
 * @author chenming
 * @date 2025-03-31
 */
@Service
public class DrawGraphInfoServiceImpl extends ServiceImpl<DrawGraphInfoMapper, DrawGraphInfo> implements IDrawGraphInfoService
{
    @Resource
    private DrawGraphInfoMapper drawGraphInfoMapper;

    /**
     * 查询【请填写功能名称】
     *
     * @param id 【请填写功能名称】主键
     * @return 【请填写功能名称】
     */
    @Override
    public DrawGraphInfo selectDrawGraphInfoById(String id)
    {
        return drawGraphInfoMapper.selectDrawGraphInfoById(id);
    }

    /**
     * 查询【请填写功能名称】列表
     *
     * @param drawGraphInfo 【请填写功能名称】
     * @return 【请填写功能名称】
     */
    @Override
    public List<DrawGraphInfo> selectDrawGraphInfoList(DrawGraphInfo drawGraphInfo)
    {
        return drawGraphInfoMapper.selectDrawGraphInfoList(drawGraphInfo);
    }

    /**
     * 新增【请填写功能名称】
     *
     * @param drawGraphInfo 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int insertDrawGraphInfo(DrawGraphInfo drawGraphInfo)
    {
            drawGraphInfo.setId(IdWorker.getIdStr());
            return drawGraphInfoMapper.insertDrawGraphInfo(drawGraphInfo);
    }

    /**
     * 修改【请填写功能名称】
     *
     * @param drawGraphInfo 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int updateDrawGraphInfo(DrawGraphInfo drawGraphInfo)
    {
        return drawGraphInfoMapper.updateDrawGraphInfo(drawGraphInfo);
    }

    /**
     * 批量删除【请填写功能名称】
     *
     * @param ids 需要删除的【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deleteDrawGraphInfoByIds(String[] ids)
    {
        return drawGraphInfoMapper.deleteDrawGraphInfoByIds(ids);
    }

    /**
     * 删除【请填写功能名称】信息
     *
     * @param id 【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deleteDrawGraphInfoById(String id)
    {
        return drawGraphInfoMapper.deleteDrawGraphInfoById(id);
    }
}
